package com.suemi.missile.common.mql.query;

import org.elasticsearch.action.ActionRequest;
import org.elasticsearch.action.ActionRequestBuilder;
import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.action.search.SearchRequestBuilder;

public class MqlSearchRequestBuilder implements MqlElasticRequestBuilder {

  SearchRequestBuilder requestBuilder;

  public MqlSearchRequestBuilder(SearchRequestBuilder requestBuilder) {
    this.requestBuilder = requestBuilder;
  }

  public ActionRequest request() {
    return requestBuilder.request();
  }

  @Override
  public String explain() {
    return requestBuilder.toString();
  }

  @Override
  public ActionResponse get() {
    return requestBuilder.get();
  }

  @Override
  public ActionRequestBuilder getBuilder() {
    return requestBuilder;
  }

  @Override
  public String toString() {
    return this.requestBuilder.toString();
  }
}
